package com.usian.admin.job;

import com.usian.admin.service.WemediaNewsAutoService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定时发布自媒体文章的任务类
 */
@Component
@Slf4j
public class WemediaAutoAuditJob {

    @Autowired
    private WemediaNewsAutoService wemediaNewsAutoService;

    @XxlJob("wemediaNewsAutoPub")
    public ReturnT<String> execute(String param){
        log.info("wemediaNewsAutoPub执行了。。。");
        //定时发布待审核的自媒体文章
        wemediaNewsAutoService.auditWmNewsTask();
        return ReturnT.SUCCESS;
    }
}
